package tech.aistar.service;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import tech.aistar.entity.Pet;
import tech.aistar.util.IdWorker;

import java.sql.Date;

@RunWith(SpringRunner.class)
@SpringBootTest
public class PetServiceTest {
    @Autowired
    private IPetService petService;
    @Autowired
    private IdWorker idWorker;

    @Test
    public void test(){
        Pet p1 = new Pet(Long.valueOf(idWorker.nextId()),1,"小E",3,1,0,"https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1490479249,811720880&fm=173&app=49&f=JPEG?w=640&h=469&s=303A76D916327794200C0C200300E0D4",null,1,0);
        petService.addPet(p1);

//
        System.out.println(petService.findAllById(1));
    }
}
